package com.tianruan.dc.modules.sys.user.entity.dto;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.tianruan.dc.common.base.entity.dto.BaseDTO;
import com.tianruan.dc.modules.sys.user.entity.db.PermissionDO;
import com.tianruan.dc.modules.sys.user.entity.db.RoleDO;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.Date;
import java.util.List;

@Data
public class UserDTO extends BaseDTO<UserDTO> {

    private String id;

    private String companyId;

    @NotNull(message = "学院不可为空")
    private String officeId;

    private String no;

    @NotNull
    private String username;

    @JsonIgnore
    private String password;

    @NotNull
    private String name;

    private String phone;

    private String email;

    @NotNull
    @Pattern(regexp = "^1|0")
    private String sex;

    private List<String> roleIds;

    /** 入学年份 */
    private String enrollmentYear;

    private String loginIp;

    private Date loginDate;

    private String loginFlag;

    private String type;

    private List<PermissionDO> permissionList;

    private List<RoleDO> roleList;

    private List<String> roleIdList;

    private String officeName;

    private String smsCode;

}
